import request from '@/utils/request'

// 获取评价详情
export function getAssessment(id) {
  return request({
    url: `/fmea/common/fmea/assessment/${id}`,
    method: 'get'
  })
}

// 获取ap
export function calcAp(data) {
  return request({
    url: '/fmea/common/fmea/selectTtFmeaAp',
    method: 'post',
    data: data
  })
}

// 更新FMEA评分
export function updateTtFmeaScore(data) {
  return request({
    url: '/fmea/common/fmea/updateTtFmeaScore',
    method: 'put',
    data: data
  })
}

// 计算特性符号
export function calcSymbol(data) {
  return request({
    url: '/fmea/common/fmea/selectTtFmeaSymbol',
    method: 'post',
    data: data
  })
}

// 获取柏拉图数据
export function queryParetoData(data) {
  return request({
    url: `/fmea/common/fmea/queryParetoData`,
    method: 'get',
    params: data
  })
}
